--- id: TASK-008 title: List and checkbox continuation status: "\U0001F3C1 Done" assignee: [] created_date: '2026-06-29 16:26' updated_date: '2026-06-29 21:08' labels: - feature - release-1 dependencies: [] priority: high ordinal: 8000 --- ## Description Release 1. Markdown table-stakes. Enter on a list line ('- ', '* ', '+ ', 'N. ', '- [ ] ') starts a new item with the same marker and indentation; ordered lists increment the number; checkboxes continue as '- [ ] '. Enter on an EMPTY list item removes the marker and exits the list. Tab / Shift+Tab indent / outdent the current list item (adjust leading whitespace). Toggle a checkbox '[ ]'<->'[x]' with a key or by editing. ## Acceptance Criteria - [x] #1 Enter continues the list marker (ordered numbers increment) - [x] #2 Enter on an empty item exits the list (removes the marker) - [x] #3 Tab / Shift+Tab indent and outdent list items ## Implementation Plan 1. parseListItem(line): detect indent + bullet (-,*,+) or ordered (N. / N)) + optional [ ]/[x] checkbox; return prefix. 2. ContinueList(): Enter on list line — empty content removes marker (exit list); else split at cursor, new line gets continued marker (ordered increments, checkbox resets to [ ]). Returns true if handled. 3. IndentLine()/OutdentLine(): adjust leading whitespace by 2-space unit (tab counts as one level on outdent). 4. Wire dispatch: KeyEnter -> ContinueList else InsertNewline; KeyTab -> IndentLine on list item else literal tab; KeyShiftTab -> OutdentLine on list item. editKindOf: KeyShiftTab structural+mutating. 5. TDD: lists_test.go covers AC1 (continue, ordered increment, checkbox), AC2 (empty exit), AC3 (indent/outdent). Lint+vet+build, commit referencing TASK-008. ## Implementation Notes Implemented in internal/editor/lists.go (parseListItem, ContinueList, IndentLine, OutdentLine); wired KeyEnter/KeyTab/KeyShiftTab in dispatch; KeyShiftTab added to editKindOf (structural). 19 tests in lists_test.go cover bullet/star/plus/ordered(./)) continuation, checkbox reset to [ ], indent preservation, mid-item split, empty-item exit, non-list plain newline, Tab indent (2-space) vs literal tab, Shift+Tab outdent (space+tab), no-op at zero indent, undo. Checkbox toggle-by-key from the description left out of scope (not an AC) — can be a follow-up. go test/vet/build/lint all clean.